
import {simpleServer} from '@/tools/servers'

/**
 * 培训资料
 */
export class TrainingDataService {
    // 分页查询列表
    static findTrainingDatas (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findTrainingDatas,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingDatas', body);
    }


    //根据培训资料Id查询培训资料
    static findTrainingData (trainingDataId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findTrainingData ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingData',body);
    }

    //为了编辑,根据培训资料Id查询培训资料
    static findTrainingDataForEdit(trainingDataId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findTrainingDataForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingDataForEdit',body);
    }

    //为了查看,根据培训资料Id查询培训资料，所有外键字段的名称都已加载
    static findTrainingDataForView(trainingDataId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findTrainingDataForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingDataForView',body);
    }

    //创建新的培训资料
    static createTrainingData() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createTrainingData,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/createTrainingData',body);
    }

    //保存培训资料
    static saveTrainingData(trainingData) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveTrainingData,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/saveTrainingData', body);
    }

    //编辑培训资料
    static updateTrainingData (trainingData) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateTrainingData,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/updateTrainingData', body);
    }

    //根据培训资料Id删除培训资料
    static deleteTrainingData (trainingDataId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteTrainingData,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/deleteTrainingData',body);
    }

    //为了查看,根据培训资料Id查询培训资料，只加载ID 和 名称
    static findTrainingDatasWithIdNameById(trainingDataId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findTrainingDatasWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingDatasWithIdNameById',body);
    }

    //为了查看,根据培训资料 名称 查询培训资料，只加载ID 和 名称
    static findTrainingDatasWithIdNameByName(trainingDataName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findTrainingDatasWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/training/TrainingData/findTrainingDatasWithIdNameByName',body);
    }


}
